package com.bw.club.net

import androidx.lifecycle.ViewModel
import okhttp3.OkHttpClient
import okhttp3.logging.HttpLoggingInterceptor
import retrofit2.Retrofit

class ClubViewModel: ViewModel() {

    private val retrofit: Retrofit by lazy {
        Retrofit.Builder()
            .client(generateOkHttpClient())
            .build()
    }



}

private fun ClubViewModel.generateOkHttpClient(): OkHttpClient {

    return OkHttpClient.Builder()
        .addInterceptor(HttpLoggingInterceptor().setLevel(HttpLoggingInterceptor.Level.BODY))
        .build()
}
